<%@ include file="/view/template/header.jsp"%>
<div id="content">
	<%@ include file="/view/ehr/ehr_common.jsp"%>
	<div class="right-content">
		<div class="box">
			<div class="sub_box">
				<h1>
					<s:text name="menu.supply_chain.prescription_drugs"></s:text>
				</h1>
				<s:form action="prescription_drugs_form" method="post">

					<div class="con-part">
						<span><s:text name="prescriptionDrugs1.patientId"></s:text>
						<img name="logo" src="<% out.print(baseURL);%>/view/required.jpg" width="15" height="20" alt="required" />
						</span>
						<s:if test="#parameters['patient_id'][0]!=0">
							<s:textfield key="prescriptionDrugs.patientId" required="true"
							cssErrorClass="error" value="%{#parameters['patient_id'][0]}"></s:textfield>
						</s:if>
						<s:elseif test='prescriptionDrugs.patientId!=0'>
							<s:textfield key="prescriptionDrugs.patientId" required="true"
							cssErrorClass="error" value="%{prescriptionDrugs.patientId}"></s:textfield>
						</s:elseif>
						<s:else>
							<s:textfield key="prescriptionDrugs.patientId" required="true"
							cssErrorClass="error"></s:textfield>
						</s:else>
						<s:fielderror cssStyle="errorMessage">
							<s:param value="%{'prescriptionDrugs.patientId'}" />
						</s:fielderror>
					</div>

					<div class="con-part">
						<span><s:text name="prescriptionDrugs1.requestId"></s:text>
						<img name="required" src="<% out.print(baseURL);%>/view/required.jpg" width="15" height="20" alt="required" />
						</span>
						<s:textfield key="prescriptionDrugs.requestId" required="true"
							cssErrorClass="error"></s:textfield>
						<s:fielderror cssStyle="errorMessage">
							<s:param value="%{'prescriptionDrugs.requestId'}" />
						</s:fielderror>
					</div>

					<div class="con-part">
						<span><s:text name="prescriptionDrugs1.drugId"></s:text> </span>
						<s:select key="prescriptionDrugs.drugId" cssClass="select_box"
							list="#{'1': 'Paracetamol', '2': 'Amoxicilline', '3': 'Vitamin B', '4': 'Penicillamine', '5': 'Aspirin', '6': 'Folic Acid', '7': 'Vitamin E', '8': 'Digoxin', '9': 'Benicar HCT', '10': 'Potassium Chloride'}"
							headerKey="1" headerValue="----Select Drug----"
							cssErrorClass="error" />
						<s:fielderror cssStyle="errorMessage">
							<s:param value="%{'prescriptionDrugs.drugId'}" />
						</s:fielderror>
					</div>

					<div class="con-part">
						<span><s:text name="prescriptionDrugs1.dosage"></s:text>
						<img name="logo" src="<% out.print(baseURL);%>/view/required.jpg" width="15" height="20" alt="required" /> </span>
						<s:textfield name="prescriptionDrugs.dosage" required="true"
							cssErrorClass="error"></s:textfield>
						<s:fielderror cssStyle="errorMessage">
							<s:param value="%{'prescriptionDrugs.dosage'}" />
						</s:fielderror>
					</div>

					<div class="con-part">
						<span><s:text name="prescriptionDrugs1.minAmount"></s:text>
						<img name="logo" src="<% out.print(baseURL);%>/view/required.jpg" width="15" height="20" alt="required" />
						</span>
						<s:textfield key="prescriptionDrugs.minAmount" required="true"
							cssErrorClass="error"></s:textfield>
						<s:fielderror cssStyle="errorMessage">
							<s:param value="%{'prescriptionDrugs.minAmount'}" />
						</s:fielderror>
					</div>

					<div class="con-part">
						<span><s:text name="prescriptionDrugs1.maxAmount"></s:text>
						<img name="logo" src="<% out.print(baseURL);%>/view/required.jpg" width="15" height="20" alt="required" />
						</span>
						<s:textfield key="prescriptionDrugs.maxAmount" required="true"
							cssErrorClass="error"></s:textfield>
						<s:fielderror cssStyle="errorMessage">
							<s:param value="%{'prescriptionDrugs.maxAmount'}" />
						</s:fielderror>
					</div>

					<div class="con-part">
						<span><s:text name="prescriptionDrugs1.amountUnits"></s:text>
						</span>
						<s:select key="prescriptionDrugs.amountUnits"
							cssClass="select_box"
							list="#{'mg': 'Mili-grams', 'ml': 'Mili-litre'}" headerKey="mg"
							headerValue="----Select Unit----" cssErrorClass="error" />
						<s:fielderror cssStyle="errorMessage">
							<s:param value="%{'prescriptionDrugs.amountUnits'}" />
						</s:fielderror>
					</div>

					<div class="con-part">
						<span><s:text name="prescriptionDrugs1.quantity"></s:text>
						<img name="logo" src="<% out.print(baseURL);%>/view/required.jpg" width="15" height="20" alt="required" />
						</span>
						<s:textfield key="prescriptionDrugs.quantity" required="true"
							cssErrorClass="error"></s:textfield>
						<s:fielderror cssStyle="errorMessage">
							<s:param value="%{'prescriptionDrugs.quantity'}" />
						</s:fielderror>
					</div>

					<div class="con-part">
						<span><s:text name="prescriptionDrugs1.allowSubstitutes"></s:text>
						</span>
						<s:select key="prescriptionDrugs.allowSubstitutes"
							cssClass="select_box" list="#{'Y':'Yes','N':'No'}" headerKey="Y"
							headerValue="---Choose (Y/N)---" cssErrorClass="error" />
						<s:fielderror cssStyle="errorMessage">
							<s:param value="%{'prescriptionDrugs.allowSubstitutes'}" />
						</s:fielderror>
					</div>

					<div class="con-part">
						<span><s:text name="prescriptionDrugs1.requestDate"></s:text>
						<img name="logo" src="<% out.print(baseURL);%>/view/required.jpg" width="15" height="20" alt="required" />
						</span>
						<s:textfield name="prescriptionDrugs.requestDate"
							id="datetimepicker" class="input-text" cssErrorClass="error"></s:textfield>
						<s:fielderror cssStyle="errorMessage">
							<s:param value="%{'prescriptionDrugs.requestDate'}" />
						</s:fielderror>
					</div>

					<div class="con-part">
						<span><s:text name="prescriptionDrugs1.prescriptionNo"></s:text>
						<img name="logo" src="<% out.print(baseURL);%>/view/required.jpg" width="15" height="20" alt="required" />
						</span>
						<s:textfield key="prescriptionDrugs.prescriptionNo"
							required="true" cssErrorClass="error"></s:textfield>
						<s:fielderror cssStyle="errorMessage">
							<s:param value="%{'prescriptionDrugs.prescriptionNo'}" />
						</s:fielderror>
					</div>

					<div class="con-part">
						<span><s:text name="prescriptionDrugs1.prescribedByID"></s:text>
						<img name="logo" src="<% out.print(baseURL);%>/view/required.jpg" width="15" height="20" alt="required" />
						</span>
						<s:textfield key="prescriptionDrugs.prescribedByID"
							required="true" cssErrorClass="error"></s:textfield>
						<s:fielderror cssStyle="errorMessage">
							<s:param value="%{'prescriptionDrugs.prescribedByID'}" />
						</s:fielderror>
					</div>

					<div class="con-part">
						<span>&nbsp;</span>
						<s:submit key="prescriptionDrugs.submit" cssClass="green"
							align="center" />
					</div>

					<div class="con-part">
						<s:if test="%{message.message!=empty}">
							<s:property value="message.message" />
						</s:if>
					</div>
				</s:form>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript"
	src="<%out.print(baseURL);%>/view/template/js/jquery-ui-timepicker-addon.js"></script>
<script>
	$(function() {
		$('#datetimepicker').datetimepicker();
	});
</script>
<%@ include file="/view/template/footer.jsp"%>
